#ifndef __DRV_FLASH_W25QXX_H__
#define __DRV_FLASH_W25QXX_H__
#include <rtdevice.h>

struct rt_w25qxx_device {
    struct rt_spi_device *spi_dev;
    void (*erase_sector)(struct rt_w25qxx_device *dev, rt_uint32_t addr);
    void (*erase_32k_block)(struct rt_w25qxx_device *dev, rt_uint32_t addr);
    void (*erase_64k_block)(struct rt_w25qxx_device *dev, rt_uint32_t addr);
    void (*erase_chip)(struct rt_w25qxx_device *dev);
    void (*program)(struct rt_w25qxx_device *dev, rt_uint32_t addr, rt_uint8_t *data_buf, rt_uint32_t size);
    void (*read)(struct rt_w25qxx_device *dev, rt_uint32_t addr, rt_uint8_t *data_buf, rt_uint32_t size);
};


#endif